package com.aerotechnic.controller;


import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.aerotechnic.entities.User;

@Controller
public class PlanificationVisiteController {

	@RequestMapping(value = "/visitePlannification/ganttView", method = RequestMethod.GET)
	String renderGanttForDesignedVisite(ModelMap model, HttpSession session) {
		if (session.getAttribute("userSession") != null) {
			System.out.println("user session is ==> "+(User)session.getAttribute("userSession"));  
			return "ganttFirstView";
		} else {
            return "redirect:/";
		}

	}

}
